403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.133
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/01040000.html
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Document Event-Driven Macros</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
      <a name="eventmacros"></a>
         <a name="bm_id3154581"></a>
         <meta itemprop="keywords" content="deleting, macro assignments to events">
         <meta itemprop="keywords" content="macros, assigning to events">
         <meta itemprop="keywords" content="assigning macros to events">
         <meta itemprop="keywords" content="documents, events">
         <meta itemprop="keywords" content="events, assigning macros">
         <meta itemprop="keywords" content="events, in documents">
         <meta itemprop="keywords" content="API, XDocumentEventListener">
         
      <h1 id="hd_id3147348" dir="auto">Document Event-Driven Macros</h1>
         <p id="par_id3146120" class="paragraph" dir="auto">This section describes how to assign scripts to application, document or form events.</p>
      
      <p id="par_id3149263" class="paragraph" dir="auto">You can automatically execute a macro when a specified software event occurs by assigning the desired macro to the event. The following table provides an overview of document events and at what point an assigned macro is executed.</p>

      <table border="1" class="" cellpadding="0" cellspacing="0">
         <tr>
            <th rowspan="" colspan="" class="tableheadcell" dir="auto"><p id="par_id3148455" class="tableheadintable" dir="auto">Event</p></th>
            <th rowspan="" colspan="" class="tableheadcell" dir="auto"><p id="par_id3145799" class="tableheadintable" dir="auto">An assigned macro is executed...</p></th>
            <th rowspan="" colspan="" class="tableheadcell" dir="auto"><p id="par_id3145809" class="tableheadintable" dir="auto">routine</p></th>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3149379" class="tablecontentintable" dir="auto">Start Application</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3150715" class="tablecontentintable" dir="auto">...after a LibreOffice application is started.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id721599830885588" class="tablecontentintable" dir="auto"><span class="literal">OnStartApp</span></p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3146914" class="tablecontentintable" dir="auto">Close Application</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3153765" class="tablecontentintable" dir="auto">...before a LibreOffice application is terminated.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id91599830927709" class="tablecontentintable" dir="auto"><span class="literal">OnCloseApp</span></p></td>
         </tr>
         <tr>
           <td rowspan="" colspan="" dir="auto"><p id="par_id151599831705811" class="tablecontentintable" dir="auto">Document created</p></td>
           <td rowspan="" colspan="" dir="auto"><p id="par_id501599831822339" class="tablecontentintable" dir="auto">...New document created with <span class="emph">File - New</span> or with the <span class="emph">New</span> icon. Note that this event also fires when Basic IDE opens.</p></td>
           <td rowspan="" colspan="" dir="auto"><p id="par_id361599832753891" class="tablecontentintable" dir="auto"><span class="literal">OnCreate</span></p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3145150" class="tablecontentintable" dir="auto">New Document</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3163808" class="tablecontentintable" dir="auto">...after a new document is created with <span class="emph">File - New</span> or with the <span class="emph">New</span> icon.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id1001599831631397" class="tablecontentintable" dir="auto">OnNew</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id161599836960401" class="tablecontentintable" dir="auto">Document loading finished</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id721599836993145" class="tablecontentintable" dir="auto">...before a document is opened with <span class="emph">File - Open</span> or with the <span class="emph">Open</span> icon.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id861599836995091" class="tablecontentintable" dir="auto"><span class="literal">OnLoadFinished</span></p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3145790" class="tablecontentintable" dir="auto">Open Document</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3154572" class="tablecontentintable" dir="auto">...after a document is opened with <span class="emph">File - Open</span> or with the <span class="emph">Open</span> icon.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id561599837106931" class="tablecontentintable" dir="auto">OnLoad</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3159171" class="tablecontentintable" dir="auto">Document is going to be closed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3146868" class="tablecontentintable" dir="auto">...before a document is closed.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id991599837325474" class="tablecontentintable" dir="auto">OnPrepareUnload</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3159097" class="tablecontentintable" dir="auto">Document closed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3148606" class="tablecontentintable" dir="auto">...after a document was closed. Note that the "Save Document" event may also occur when the document is saved before closing.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id1001599837386243" class="tablecontentintable" dir="auto">OnUnload</p></td>
        </tr>
        <tr>
           <td rowspan="" colspan="" dir="auto"><p id="par_id391600157320922" class="tablecontentintable" dir="auto">-no UI-</p></td>
           <td rowspan="" colspan="" dir="auto"></td>
           <td rowspan="" colspan="" dir="auto"><p id="par_id81600157323361" class="tablecontentintable" dir="auto">OnLayoutFinished</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id981599837681979" class="tablecontentintable" dir="auto">View created</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id281599838210270" class="tablecontentintable" dir="auto">Document is displayed. Note that this event also happens when a document is duplicated.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id221599838211428" class="tablecontentintable" dir="auto">OnViewCreated</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id511599837683562" class="tablecontentintable" dir="auto">View is going to be closed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id331599838046012" class="tablecontentintable" dir="auto">Document layout is getting removed.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id851599838047612" class="tablecontentintable" dir="auto">OnPrepareViewClosing</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id951599837684882" class="tablecontentintable" dir="auto">View closed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id51599837816122" class="tablecontentintable" dir="auto">Document layout is cleared prior to the document closure.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id131599837818052" class="tablecontentintable" dir="auto">OnViewClosed</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3144772" class="tablecontentintable" dir="auto">Activate Document</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3149442" class="tablecontentintable" dir="auto">...after a document is brought to the foreground.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id401599838521395" class="tablecontentintable" dir="auto">OnFocus</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3150888" class="tablecontentintable" dir="auto">Deactivate Document</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3154060" class="tablecontentintable" dir="auto">...after another document is brought to the foreground.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id311599838560117" class="tablecontentintable" dir="auto">OnUnfocus</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3150519" class="tablecontentintable" dir="auto">Save Document</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3155529" class="tablecontentintable" dir="auto">...before a document is saved with <span class="emph">File - Save</span> or the <span class="emph">Save</span> icon, provided that a document name has already been specified.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id541599838897948" class="tablecontentintable" dir="auto">OnSaveAs</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3149404" class="tablecontentintable" dir="auto">Document has been saved</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3151332" class="tablecontentintable" dir="auto">...after a document is saved with <span class="emph">File - Save</span> or the <span class="emph">Save</span> icon, provided that a document name has already been specified.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id931599838938268" class="tablecontentintable" dir="auto">OnSaveDone</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id161599838976700" class="tablecontentintable" dir="auto">Saving of document failed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id391599838979652" class="tablecontentintable" dir="auto">Document could not be saved.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id21599838980580" class="tablecontentintable" dir="auto">OnSaveFailed</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3153266" class="tablecontentintable" dir="auto">Save Document As</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3150208" class="tablecontentintable" dir="auto">...before a document is saved under a specified name (with <span class="emph">File - Save As</span>, or with <span class="emph">File - Save</span> or the <span class="emph">Save</span> icon, if a document name has not yet been specified).</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id11599840125398" class="tablecontentintable" dir="auto">OnSaveAs</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3158215" class="tablecontentintable" dir="auto">Document has been saved as</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3150980" class="tablecontentintable" dir="auto">... after a document was saved under a specified name (with <span class="emph">File - Save As</span>, or with <span class="emph">File - Save</span> or with the <span class="emph">Save</span> icon, if a document name has not yet been specified).</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id811599840174261" class="tablecontentintable" dir="auto">OnSaveAsDone</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id561599839702598" class="tablecontentintable" dir="auto">'Save As' has failed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id951599840240048" class="tablecontentintable" dir="auto">Document could not be saved.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id131599840241061" class="tablecontentintable" dir="auto">OnSaveAsFailed</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id851599839190548" class="tablecontentintable" dir="auto">-no UI-</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id961599839198859" class="tablecontentintable" dir="auto">When the document disk location has changed, for example after a <span class="emph">File - Save As</span> action.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id651599839199901" class="tablecontentintable" dir="auto">OnStorageChanged</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id501600150804809" class="tablecontentintable" dir="auto">Storing or exporting copy of document</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id471610080505705" class="tablecontentintable" dir="auto">...before a document is saved with <span class="menuitem">File - Save a Copy</span>, <span class="menuitem">File - Export</span>, <span class="menuitem">File - Export as PDF</span> or the <span class="menuitem">Save</span> icons.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id781617239899601" class="tablecontentintable" dir="auto">OnCopyTo</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id502600180504809" class="tablecontentintable" dir="auto">Document copy has been created</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id471601180505705" class="tablecontentintable" dir="auto">...after a document is saved with <span class="menuitem">File - Save a Copy</span>, <span class="menuitem">File - Export</span>, <span class="menuitem">File - Export as PDF</span> or the <span class="menuitem">Save</span> icons.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id781614179899601" class="tablecontentintable" dir="auto">OnCopyToDone</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id501006180504809" class="tablecontentintable" dir="auto">Creating of document copy failed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id471600081505705" class="tablecontentintable" dir="auto">Document could not be copied or exported.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id781613179998601" class="tablecontentintable" dir="auto">OnCopyToFailed</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id501600180504809" class="tablecontentintable" dir="auto">Print document</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id471600180505705" class="tablecontentintable" dir="auto">...after the Print dialog is closed, but before the actual print process begins. This event occurs for each copy printed.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id781613179899601" class="tablecontentintable" dir="auto">OnPrint</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id371600180345993" class="tablecontentintable" dir="auto">-no UI-</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id851600180346872" class="tablecontentintable" dir="auto">...after document security settings have changed.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id785600179899601" class="tablecontentintable" dir="auto">OnModeChanged</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id921600180238854" class="tablecontentintable" dir="auto">'Modified' status was changed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id321600180239944" class="tablecontentintable" dir="auto">Modified state of a document has changed.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id781600179899601" class="tablecontentintable" dir="auto">OnModifyChanged</p></td>
        </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id741600180121445" class="tablecontentintable" dir="auto">Document title changed</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id801600180122852" class="tablecontentintable" dir="auto">When the document title gets updated.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id841600179842448" class="tablecontentintable" dir="auto">OnTitleChanged</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id641600180121445" class="tablecontentintable" dir="auto">Loaded a sub component</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id701600180122852" class="tablecontentintable" dir="auto">...after a database form has been opened.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id741600179842448" class="tablecontentintable" dir="auto"><span class="literal">OnSubComponentOpened</span></p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id641700180131445" class="tablecontentintable" dir="auto">Closed a sub component</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id701600290122852" class="tablecontentintable" dir="auto">...after a database form has been closed.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id751610179842448" class="tablecontentintable" dir="auto"><span class="literal">OnSubComponentClosed</span></p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id421600097736759" class="tablecontentintable" dir="auto">Printing of form letters started</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id411600097854273" class="tablecontentintable" dir="auto">...before printing form letters using <span class="emph">File - Print</span> or <span class="emph">Tools - Mail Merge Wizard</span> menus.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id421600097855346" class="tablecontentintable" dir="auto">OnMailMerge</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id41600097737991" class="tablecontentintable" dir="auto">Printing of form letters finished</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id451600097862282" class="tablecontentintable" dir="auto">...after printing of form letters using <span class="emph">File - Print</span> or <span class="emph">Tools - Mail Merge Wizard</span> menus.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id231600097863331" class="tablecontentintable" dir="auto">OnMailMergeFinished</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id641600160655602" class="tablecontentintable" dir="auto">Printing of form fields started</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id331600160656617" class="tablecontentintable" dir="auto">...before printing form fields.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id81600160657657" class="tablecontentintable" dir="auto">OnFieldMerge</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id801600160725659" class="tablecontentintable" dir="auto">Printing of form fields finished</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id961600160726645" class="tablecontentintable" dir="auto">...after printing form fields.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id551600160727188" class="tablecontentintable" dir="auto">OnFieldMergeFinished</p></td>
         </tr>
         <tr>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3156366" class="tablecontentintable" dir="auto">Change of the page count</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id3154627" class="tablecontentintable" dir="auto">When the page count changes.</p></td>
            <td rowspan="" colspan="" dir="auto"><p id="par_id931600098241318" class="tablecontentintable" dir="auto">OnPageCountChanged</p></td>
         </tr>
      </table>
<br>

      <div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id131600158369191" dir="auto">Most events relate to documents, except <span class="literal">OnStartApp</span>, <span class="literal">OnCloseApp</span>, <span class="literal">OnCreate</span> and <span class="literal">OnLoadFinished</span> that occur at application level. <span class="literal">OnSubComponentOpened</span>, and <span class="literal">OnSubComponentClosed</span> events are fired by database's forms.</p></div>
</div>
<br>

     <div class="tip">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/tip.svg" alt="tip" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id321600158566782" dir="auto">Writer documents are triggering those specific events: <span class="literal">OnLayoutFinished</span>, <span class="literal">OnMailMerge</span>, <span class="literal">OnMailMergeFinished</span>, <span class="literal">OnFieldMerge</span>, <span class="literal">OnFieldMergeFinished</span> and <span class="literal">OnPageCountChanged</span>.</p></div>
</div>
<br>

      <h2 id="hd_id3153299" dir="auto">Assigning a Macro to an Event</h2>
      <ol itemprop="HowTo" itemscope="true" itemtype="http://schema.org/HowToSection" dir="auto">
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3147244" class="listitem" dir="auto">Choose <span class="emph">Tools - Customize</span> and click the <span class="emph">Events</span> tab.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3146098" class="listitem" dir="auto">Select whether you want the assignment to be globally valid or just valid in the current document in the <span class="emph">Save In</span> listbox.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3150431" class="listitem" dir="auto">Select the event from the <span class="emph">Event</span> list.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3148742" class="listitem" dir="auto">Click <span class="emph">Macro</span> and select the macro to be assigned to the selected event.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3146321" class="listitem" dir="auto">Click <span class="emph">OK</span> to assign the macro.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3147414" class="listitem" dir="auto">Click <span class="emph">OK</span> to close the dialog.</p></li>
      </ol>

      <h2 id="hd_id3154581" dir="auto">Removing the Assignment of a Macro to an Event</h2>
      <ol itemprop="HowTo" itemscope="true" itemtype="http://schema.org/HowToSection" dir="auto">
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3146883" class="listitem" dir="auto">Choose <span class="emph">Tools - Customize</span> and click the <span class="emph">Events</span> tab.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3155909" class="listitem" dir="auto">Select whether you want to remove a global assignment or an assignment that is just valid in the current document by selecting the option in the <span class="emph">Save In</span> listbox.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3159129" class="listitem" dir="auto">Select the event that contains the assignment to be removed from the <span class="emph">Event</span> list.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3149143" class="listitem" dir="auto">Click <span class="emph">Remove</span>.</p></li>
         <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto"><p id="par_id3149351" class="listitem" dir="auto">Click <span class="emph">OK</span> to close the dialog.</p></li>
      </ol>

      <a name="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a name="related"></a><span class="emph">Related Topics</span>
</p>
<div class="relatedbody" itemprop="mentions">
         <p id="par_id341600162682135" class="paragraph" dir="auto">In addition to assigning macros to events, one can <a target="_top" href="en-US/text/sbasic/python/python_document_events.html">monitor events</a> triggered in LibreOffice documents.</p>
      </div>
</div>

   </div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/01040000.xhp" target="_blank">/text/sbasic/shared/01040000.xhp</a></p>
<p dir="auto">Title is: Document Event-Driven Macros</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit